package com.sxpi.user.service.useramount;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sxpi.common.result.R;
import com.sxpi.user.dto.UserAmountDto;
import com.sxpi.user.pojo.UserAmountRecord;

/**
 * @Author: 董伟豪
 * @Date: 2022/11/8 21:13
 */
public interface IUserAmountRecordService extends IService<UserAmountRecord> {

    /**
     * 提现方法---无锁
     * @param userAmountDto
     * @return
     */
    R takeMoney(UserAmountDto userAmountDto);

    /**
     * 提现方法---悲观锁
     * @param userAmountDto
     * @return
     */
    R takeMoneyPessimismLock(UserAmountDto userAmountDto);

    /**
     * 提现方法---乐观锁
     * @param userAmountDto
     * @return
     */
    R takeMoneyOptimismLock(UserAmountDto userAmountDto);
}
